#include<iostream>
#include<string>
#include<ctemplate/template.h>

using namespace std;
int main()
{
    string html = "./test.html";
    string value = "liuhaodong";
    ctemplate::TemplateDictionary root("demo");//类似于 map<> demo;
    root.SetValue("key",value);
    ctemplate::Template * td = ctemplate::Template::GetTemplate(html,ctemplate::DO_NOT_STRIP);
    std::string outstr;
    td->Expand(&outstr,&root);
    std::cout<<outstr<<std::endl;
    //运行之前记得先export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:/usr/local/lib一下;
    return 0;
}